package com.sskj.hangqing.presenter;

import com.lzy.okgo.model.Response;
import com.sskj.common.base.HttpData;
import com.sskj.hangqing.http.HttpConfig;
import com.sskj.hangqing.ui.fragment.ZixunFragment;
import com.sskj.lib.http.JsonCallBack;

import java.util.List;


public class ZixunFragmentPresenter extends BasePresenter<ZixunFragment> {

    public void getBanner() {
        httpService.getZixunBanner()
                .tag(this)
                .execute(new JsonCallBack<HttpData<List<String>>>() {
                    @Override
                    public void onSuccess(Response<HttpData<List<String>>> response) {
                        HttpData<List<String>> httpData = response.body();
                        if (httpData.getStatus() == HttpConfig.OK) {
                            mView.updateUI(httpData.getData());

                        }
                    }
                });
    }
}
